#!/bin/bash

PID=$(sudo lsof -i :38828 -t)
if [ -n "$PID" ]; then
    kill -15 "$PID"
    echo "Kill process $PID"
else
    echo "No process found on port 38828"
fi

nohup /home/ubuntu/installs/miniforge3/envs/py310/bin/python run.py &

echo "Started new process at port 38828"